/**
 * 管理后台首页相关JS
 * author: zhanghua 2015-9-9
 */
$(function(){
	$('#getCode').click(function () {
		var username = $("#registerUserName").val();
		var data = {
			"username": username,
		};
		var postUrl = $('#postCodeUrl').val()
		var jumpUrl = $('#jumpUrl').val();

		post_json(postUrl, data ,function(res){
			switch(res.status){
				case 1:
					location.href = jumpUrl;
					break;
				case 0:
					alert(res.msg);
					break;
			}
			login.btn.attr('disabled',false);
		});
		return false;
	});
});


